package com.example.oschina.network.sync

import com.example.oschina.network.mode.TokenMode
import retrofit2.Call
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST


interface OschinaService {

  @FormUrlEncoded
  @POST("action/openapi/token")
  fun getToken(
    @Field("client_id") client_id: String = "vsk2zMLvp7BPdXudXVxj",
    @Field("client_secret") client_secret: String = "OgdBmEYMTvQtUqq3bt7MqlkKCyOha1EG",
    @Field("grant_type") grant_type: String = "authorization_code",
    @Field("redirect_uri") redirect_uri: String = "redirect_uri",
    @Field("code") code: String,
    @Field("dataType") dataType: String = "json"
//               @Field("callback") callback: String

  ): Call<TokenMode>

}